package com.docHunt.action;

import org.apache.log4j.Logger;

public class HomeAction extends BaseAction {

	private static final long serialVersionUID = 1L;
	private Logger logger = Logger.getLogger(HomeAction.class);

	private String buttonName;

	public String execute() throws Exception {

		logger.info("HomeAction :: init - method start");

		logger.info("Button Name : " + buttonName);
		
		if(buttonName != null && buttonName.equals("signIn")){
			return "loginInit";
		}else if(buttonName != null && buttonName.equals("register")){
			return "doctorRegInit";
		}
		
		logger.info("HomeAction :: init - method end");
		return SUCCESS;
	}

	public String getButtonName() {
		return buttonName;
	}

	public void setButtonName(String buttonName) {
		this.buttonName = buttonName;
	}

}